package com.qf.web;

import com.qf.bean.Dept;
import com.qf.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * 2019/11/20
 * 键盘敲烂，月薪过万
 * 登高必自卑，行远必自迩。
 * 不忘初心：像初学者一样拥有一颗谦虚、开放的心态。
 * 李学峰
 */
@Controller
public class DeptController {

    @Autowired
    private DeptService deptService;
@RequestMapping("/resource/demo2/getalldepts")
    public String getall(ModelMap map){
    List<Dept> list = deptService.findalldepts();
    map.addAttribute("dlist",list);
    return "resource/demo2/add";
}
}
















